package edu.sctu.practice.class01.zhengsenwen.assign.assign03.test02;

/**
 * Created by zhengsenwen on 2015/10/29.
 */
public class ComparableCircle extends Circle implements Comparable {


    //            （3）创建类ComparableCircle，该类为Circle类的子类，并实现Comparable接口。


    public ComparableCircle(float redius) {
        super(redius);
    }
    @Override
    public int compareTo(Object object) {
        if (getArea(2.0f) > ((ComparableCylinder) object).getArea(2.0f,3.0f)) {
            return 0;
        }
        return 1;
    }


}
